<?php
include_once("codelibrary/inc/variables.php");
function query($query,$extra="")
{
	$result = mysql_query($query) or die("Query execution error : ".mysql_error()."<br> Query : $query <br> Query Type : $extra");
	return $result;
}


$business_id = $_POST['business_id'];
$query = "select  customer_id from customer_info where username='$username' and password='$password' and business_id='$business_id'";
$res = query($query);
$obj = mysql_fetch_object($res);
if($obj->customer_id !='') {
	$_SESSION['customer_id'] = $obj->customer_id;
	$_SESSION['logintype'] = "user";
	$_SESSION['business_id'] = $business_id;
	header("location:customer-make-appointment.php");
} else {
	header("location:customer-login.php?logerr=login&business_id=$business_id	");
}

?>
